<?php

class GestionSessionClient extends CI_Controller {

	
	public function lister() // 
	{
		$this->load->view('headerClient.php');
		$this->load->model('modeleSessionClient');
		$data['enregt'] = $this->modeleSessionClient->listeSessionClient();
		$this->load->view('v_listeSession_Client',$data);
	}
	
	function controle_formulaireSession($chaine)
	{
		if ($chaine == "Votre choix")
		{
			$this->form_validation->set_message('controle_formulaireSession', 'Le champ %s ne doit pas contenir : "Votre choix"');
			return FALSE;
		}
		else
		{
			return TRUE;
		}
	}
	public function modifier($numSession)
	{
		
		$this->load->model('modeleSessionAdmin');
		$data['enregt'] = $this->modeleSessionAdmin->modificationSessionAdmin($numSession);
		
		$this->load->view('headerClient.php');
		$this->load->view('v_modifSession',$data);
	}
	public function supprimer($numSession) // 
	{
		$this->load->model('modeleSessionAdmin');
		$data['enregt'] = $this->modeleSessionAdmin->suppressionSessionAdmin($numSession);
		
		$this->load->view('headerClient.php');
		$this->load->view('v_supprimSession',$data);
	}

	public function inscription($numSession, $libelle, $niveau)
	{
		$this->load->model('modeleSessionClient');
		$this->modeleSessionClient->inscription($numSession, $libelle, $niveau);

		$this->load->view('headerClient.php');
		$this->load->view('v_inscription.php');
		
	}
}
